<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
    <script>
        var b = confirm("欲练此功，必先自宫，确认是否练功")
        if(b){
            alert("我确定自宫，要修炼此功法")
        }
        else{
            alert("太邪门，不练了")
        }
    </script>
</html>